package org.kth.dks.planetlab;


public class KeepAliveThread extends Thread {

	private int interval;

	private PlanetLabDKS pldks;
	
	public KeepAliveThread(int interval, PlanetLabDKS pldks) {
		super();
		this.interval = interval;
		this.pldks = pldks;
	}
	
	public void run() {
		while (true) {
			try {
				Thread.sleep(interval * 1000);
			} catch (InterruptedException e) {
			}
			
			pldks.sendKeepAlive();
		}
	}
}
